﻿using System;
using System.Collections.Generic;
using System.Linq;
using System.Web;
using System.Web.UI;
using System.Web.UI.WebControls;
using ADSMS.BizLogic;

namespace ADSMS.Presentation.Store
{
    public partial class DepartmentList : System.Web.UI.Page
    {

        private void BindGrid()
        {
            //DepartmentService ds = new DepartmentService();
            //dgvDisplayDept.DataSource = ds.getDeptList();
            //dgvDisplayDept.DataBind();
 
        }
        protected void Page_Load(object sender, EventArgs e)
        {
            if ((HttpContext.Current.User.IsInRole("Store Manager") || HttpContext.Current.User.IsInRole("Store Supervisor") || HttpContext.Current.User.IsInRole("Store Clerk")) != true)
            {

                Response.Redirect("/Presentation/Login.aspx");


            }

            if (!IsPostBack)
            {

                BindGrid();
            }
        }

        protected void GridView1_PageIndexChanging(object sender, GridViewPageEventArgs e)
        {
            dgvDisplayDept.PageIndex = e.NewPageIndex;
            BindGrid();
        }





    }
}